
function es5_demo(){
	var obj={
		a:0,
		f:function(){
			return this.a+1
		}
	}
	
	var obj_1={};
	obj_1.__proto__=obj;//__proto__表示指向
	
	console.log(obj_1.a);
	console.log(obj_1.f());
}
/**
 * es6中引入了class
 */
function es6_demo(){
	class Human{
		constructor(name){//构造方法
			this.name=name;
			this.age=18
		}
	}
	class Male extends Human{
		constructor(name){
			super(name)//调用 父对象/父类 的构造函数
			this.gender='male'
		}
	}
	var jack=new Male('jack')
	console.log(jack)
}

function closed(){
	const modal = document.querySelector('dialog');
	modal.close();
}
function show(){
	const modal = document.querySelector('dialog');
	modal.showModal();
	setTimeout("closed()",3000 );  
}
